package org.dtrd.modules.food.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.food.entity.po.DtrdExtEmsYwRecipes;

/**
 * <p>
 * 食谱
 * </p>
 *
 * @author QR
 * @since 2021-12-08
 */
@Getter
@Setter
@ApiModel(value = "食谱详情")
public class RecipeDetail {

    private Integer dataId;


    @ApiModelProperty("食谱分类")
    private Integer recipeCategoryid;

    @ApiModelProperty("早餐")
    private Integer recipeBreakfast;

    @ApiModelProperty("午餐")
    private Integer recipeLunch;

    @ApiModelProperty("晚餐")
    private Integer recipeDinner;

    @ApiModelProperty("全天用烹调油（g）")
    private Float recipeUseOil;

    @ApiModelProperty("食谱标签")
    private String recipeTips;

    @ApiModelProperty("食谱列表")
    private String recipeList;

    @ApiModelProperty("食谱名称")
    private String recipeName;

    @ApiModelProperty("食谱URL")
    private String recipeUrl;

    private String recipeMeal;

    private String recipeThumb;

    @ApiModelProperty("早餐加餐")
    private Integer recipeBreakfastAdd;

    @ApiModelProperty("午餐加餐")
    private Integer recipeLunchAdd;

    @ApiModelProperty("晚餐加餐")
    private Integer recipeDinnerAdd;

    @ApiModelProperty("食谱千卡")
    private Integer recipeKcal;

    public RecipeDetail parseFromPo(DtrdExtEmsYwRecipes po) {
        dataId = po.getDataId();
        recipeCategoryid = po.getRecipeCategoryId();
        recipeBreakfast = po.getRecipeBreakfast();
        recipeLunch = po.getRecipeLunch();
        recipeDinner = po.getRecipeDinner();
        recipeUseOil = po.getRecipeUseOil();
        recipeTips = po.getRecipeTips();
        recipeList = po.getRecipeList();
        recipeName = po.getRecipeName();
        recipeUrl = po.getRecipeUrl();
        recipeMeal = po.getRecipeMeal();
        recipeThumb = po.getRecipeThumb();
        recipeBreakfastAdd = po.getRecipeBreakfastAdd();
        recipeLunchAdd = po.getRecipeLunchAdd();
        recipeDinnerAdd = po.getRecipeDinnerAdd();
        recipeKcal = po.getRecipeKcal();
        return this;
    }
}
